<template>

    <Form ref="form" :model="formData" :rules="ruleValidate" :label-width="80">
        <input type="hidden" v-model="formData.id"/>

        <Row>
          <Col span="12">
            <FormItem label="车次" prop="trainNumber">
              <Input v-model="formData.trainNumber"></Input>
            </FormItem>
          </Col>
          <Col span="12">
            <FormItem label="乘车人" prop="passengerName">
              <Input v-model="formData.passengerName"></Input>
            </FormItem>
          </Col>
        </Row>

        <Row>
            <Col span="12">
                <FormItem label="出发站" prop="startStationName">
                    <Input v-model="formData.startStationName"></Input>
                </FormItem>
            </Col>
            <Col span="12">
              <FormItem label="到达站" prop="endStationName">
                <Input v-model="formData.endStationName"></Input>
              </FormItem>
            </Col>
        </Row>
        <Row>
            <Col span="12">
                <FormItem label="座位类型" prop="seatType">
                    <Input v-model="formData.seatType"></Input>
                </FormItem>
            </Col>
            <Col span="12">
              <FormItem label="金额" prop="money">
                <Input v-model="formData.money"></Input>
              </FormItem>
            </Col>
        </Row>
        <Row>
          <Col span="12">
            <FormItem label="乘车日期" prop="trainDate">
              <Input v-model="formData.trainDate"></Input>
            </FormItem>
          </Col>
          <Col span="12">
            <FormItem label="到达时间" prop="startTime">
              <Input v-model="formData.startTime"></Input>
            </FormItem>
          </Col>
        </Row>
        <FormItem label="备注" prop="desc">
            <Input type="textarea" :rows="10" v-model="formData.desc"></Input>
        </FormItem>

        <FormItem>
            <Button type="primary" @click="go2list()" style="margin-left: 8px">关闭</Button>
        </FormItem>

    </Form>

</template>

<script>
import { baseEdit } from '@/libs/crud/base-edit'

export default {
  mixins: [baseEdit],
  data () {
    return {
      formData: {
        id: '',
        trainDate: '',
        trainNumber: '',
        passengerId: '',
        startStationName: '',
        endStationName: '',
        seatType: '',
        money: '',
        startTime: '',
        desc: ''
      }
    }
  }
}
</script>
